<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Camera List Beautifier</title>
<script type="text/javascript">
function loadXMLDoc (fname)
{
    var xmlDoc;
    //code for IE
    if (window.ActiveXObject)
    {
        xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
    }
    //code for Mozilla, Fireforx, Opera, etc.
    else if (document.implementation &amp;&amp; document.implementation.createDocument)
    {
        xmlDoc = document.implementation.createDocument("","",null);
    }
    else
    {
    alert('Your browser cannot handle this script');
    }
    xmlDoc.async=false;
    xmlDoc.load(fname);
    return(xmlDoc);

}

function displayResult ()
{
    var name = prompt("What brand do you wish to see?", "Type the brand here");
    xml=loadXMLDoc(name + ".xml");
    xsl=loadXMLDoc("CameraSearchTransformation.xsl");
    
    //code for IE
    if (window.ActiveXObject)
    {
        ex=xml.transformNode(xsl);
        document.getElementById("example").innerHTML=ex;
    
    }
    //code for Mozilla, Fireforx, Opera, etc.
    else if (document.implementation &amp;&amp; document.implementation.createDocument)
    {
        xsltProcessor=new XSLTProcessor();
        xsltProcessor.importStylesheet(xsl);
        resultDocument = xsltProcessor.transformToFragment(xml,document);
        document.getElementById("example").appendChild(resultDocument);
    
    }
}

</script>

</head>
<body id="example" onload="displayResult()">
</body>
</html>